import java.awt.*;

class HealingParticle {
    float x, y;
    float size;
    float alpha;
    float speed;

    public HealingParticle(float x, float y) {
        this.x = x;
        this.y = y;
        this.size = 5 + (float) Math.random() * 8;
        this.alpha = 0.8f;
        this.speed = -1 - (float) Math.random() * 2;
    }

    public boolean update() {
        y += speed;
        alpha -= 0.02f;
        return alpha > 0;
    }

    public void draw(Graphics2D g) {
        g.setColor(new Color(100, 255, 100, (int) (alpha * 200)));
        g.fillOval((int) x, (int) y, (int) size, (int) size);
    }

}
